﻿/*
 * Created by SharpDevelop.
 * User: Lousabit
 * Date: 27/11/2011
 * Time: 16:08
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing;
using System.Windows.Forms;
using Business_Logic;

namespace PetSoft.GUI.RRHH
{
	/// <summary>
	/// Description of GUIMenuRRHH.
	/// </summary>
	public partial class GUIMenuRRHH : Form
	{
		public GUIMenuRRHH()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			BLPrivilegio blpriv = new BLPrivilegio();
			
			if (!blpriv.existeVentana("RRHH","EMPL",BLInfo.usuarioActual.Rol.Privilegio))
            		this.mEmpCBTN.Enabled = false;
            if (!blpriv.existeVentana("RRHH","REPA",BLInfo.usuarioActual.Rol.Privilegio))
            		this.repAsiBTN.Enabled = false;
            if (!blpriv.existeVentana("RRHH","REPE",BLInfo.usuarioActual.Rol.Privilegio))
            		this.repEmpBTN.Enabled = false;            	
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
		
		void SalirBTNClick(object sender, EventArgs e)
		{
			this.Close();
		}
		
		void MantEmpBTNClick(object sender, EventArgs e)
		{
			GUIMantenerEmpleado vEmp = new GUIMantenerEmpleado();
			vEmp.ShowDialog();
		}
		
		void RepEmpBTNClick(object sender, EventArgs e)
		{
			GUIReporteEmpleados vRepEmp = new GUIReporteEmpleados();
			vRepEmp.ShowDialog();
		}
		
		void RepAsiBTNClick(object sender, EventArgs e)
		{
			GUIReporteAsistencia vRepAsi = new GUIReporteAsistencia();
			vRepAsi.ShowDialog();
		}
	}
}
